import { Actor, Action } from 'iflux2';

import { OrderType } from '../constant/action-type';

export default class OrderActor extends Actor {
    defaultState() {
        return {
            order: {},
            afterSaleOptions: []
        }
    }

    @Action(OrderType.INIT_ORDER)
    setOrder(state, order) {
        return state.set('order', order);
    }

    @Action(OrderType.INIT_AFTER_OPTION)
    ssetAfterOrder(state, afterSaleOptions) {
        return state.set('afterSaleOptions', afterSaleOptions);
    }

}